package com.dime.basic.api;

import com.dime.basic.api.domain.DimeBaseharm;
import com.dime.basic.api.factory.RemoteBaseCombFallbackFactory;

import com.dime.basic.api.model.HarmType;
import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.domain.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;


import java.util.List;

@FeignClient(contextId = "remoteHarmService", value = ServiceNameConstants.DM_BASIC, fallbackFactory = RemoteBaseCombFallbackFactory.class)
public interface RemoteHarmService {


    @GetMapping("/baseharm/info/allharmtypes")
    public R<List<HarmType>> getAllHarmTypes();
    @GetMapping("/baseharm/info/harm/{harmcode}")
    public R<DimeBaseharm> getHarmByCode(@PathVariable("harmcode") String harmCode);

    @GetMapping("/baseharm/info/harms/{harmcodes}")
    public R<List<DimeBaseharm>> getHarmsByCodes(@PathVariable("harmcodes") String[] harmCode);

    @GetMapping("/baseharm/info/harmsByIds/{ids}")
    public R<List<DimeBaseharm>> getHarmsByIds(@PathVariable("ids") String[] Ids);
}
